package ogmios.components.munches;
import java.util.List;
/**
 * An interface for commands or objects that may continue execution in a separate thread or process.
 */
public interface Chainable
{
 /**
 * Execute the Chainable. If the Chainable encounters an error initially, it will throw a Throwable.
 * However, once it moves its execution to another thread, it will only report whether it encounters
 * an issue or not through the passed listeners.
 * <br/>
 * Like Command, Chainable's execute method should only be called once. If you need to call it more than once,
 * create a new instance of the Chainable.
 */
 void execute(Context shell, List<String> args, ChainableListener... listeners) throws Throwable;
}
